import request from "@/utils/request";

// 获取产品分类列表
export function getMaterialClassListApi(query, data) {
  return request({
    url: "/system/categoryCate/list",
    method: "get",
    params: query,
    data,
  });
}

// 新增产品分类
export function addMaterialClass(data) {
  return request({
    url: "/system/categoryCate/add",
    method: "post",
    data,
  });
}

// 新增产品分类
export function editMaterialClass(data) {
    return request({
      url: "/system/categoryCate/edit",
      method: "post",
      data,
    });
  }

// 获取产品分类详情
export function getMaterialClassApi(categoryId) {
  return request({
    url: "/system/categoryCate/getInfo",
    method: "get",
    params: { categoryId },
  });
}

// 删除产品分类
export function deleteMaterialClassApi(categoryId) {
  return request({
    url: `/system/categoryCate/del`,
    method: "get",
    params: { categoryId },
  });
}
